let fullData = [] as any

let values = [] as any

export const option = {
    // backgroundColor: 'rgba(0, 19, 48, 1)',
    title: {
        text: '贫困县销量统计',
        top: 15,
        left: 18,
        textStyle: {
            color: '#ffffff',
            fontSize: 20
        }
    },
    tooltip: {
        show: true,
        trigger: 'item',
        padding: [8, 15],
        backgroundColor: '#ffffff',
        borderColor: 'rgba(3, 11, 44, 0.5)',
        color: 'black'
    },
    legend: {
        show: false
    },
    grid: {
        left: '5%',
        right: '5%',
        top: '20%',
        bottom: '3%'
    },
    xAxis: [
        {
            splitLine: {
                show: false
            },
            type: 'value',
            show: false,
            axisLine: {
                //x轴坐标轴，false为隐藏，true为显示
                show: false
            }
        }
    ],
    yAxis: [
        {
            show: true,
            splitLine: {
                show: false
            },
            axisLine: {
                show: false
            },
            type: 'category',
            axisTick: {
                show: false
            },
            inverse: true,
            axisLabel: {
                show: false
            }
        },
        {
            type: 'category',
            inverse: true,
            axisTick: 'none',
            axisLine: 'none',
            show: true,
            axisLabel: {
                inside: true,
                verticalAlign: 'bottom',
                lineHeight: 54,
                margin: 5, //刻度标签与轴线之间的距离
                show: true,
                color: 'rgba(255, 255, 255, 1)',
                fontFamily: 'SourceHanSansCN-Normal',
                fontSize: 15,
                formatter: function (value: any) {
                    return value + '万元'
                }
            },
            data: values
        }
    ],
    series: [
        {
            show: true,
            name: '',
            type: 'bar',
            data: fullData,
            barWidth: 20, // 柱子宽度
            showBackground: true,
            backgroundStyle: {
                color: {
                    type: 'linear',
                    x: 0,
                    y: 0,
                    x2: 1,
                    y2: 1,
                    colorStops: [
                        {
                            offset: 0,
                            color: 'rgba(5, 31, 81, 1)'
                        },
                        {
                            offset: 1,
                            color: 'rgba(21, 78, 138, 1)'
                        }
                    ]
                }
            },
            label: {
                show: true,
                offset: [5, -25],
                color: 'rgba(255, 255, 255, 1)',
                fontFamily: 'SourceHanSansCN-Normal',
                fontSize: 15, //左边字体大小
                fontWeight: 500,
                position: 'left',
                align: 'left',
                formatter: function (params: any) {
                    return params.name + '     ' + params.value + '万元'
                }
            },
            itemStyle: {
                barBorderRadius: [10, 10, 10, 10],
                color: {
                    type: 'linear',
                    x: 0,
                    y: 0,
                    x2: 1,
                    y2: 1,
                    colorStops: [
                        {
                            offset: 0,
                            color: 'rgba(80, 179, 255, 0.3)'
                        },
                        {
                            offset: 1,
                            color: 'rgba(93, 160, 236, 1)'
                        }
                    ]
                }
            }
        },
        {
            type: 'scatter',
            emphasis: {
                scale: false
            },
            symbol: 'rect',
            symbolSize: [5, 26], // 进度条白点
            itemStyle: {
                show: true,
                barBorderRadius: [10, 10, 10, 10],
                color: '#FFF',
                shadowColor: 'rgba(255, 255, 255, 0.5)',
                shadowBlur: 5,
                borderWidth: 1,
                opacity: 1
            },
            z: 2,
            data: fullData,
            animationDelay: 500
        }
    ],
    dataZoom: [
        {
            yAxisIndex: [0, 1], // 这里是从X轴的0刻度开始
            show: false, // 是否显示滑动条，不影响使用
            type: 'slider', // 这个 dataZoom 组件是 slider 型 dataZoom 组件
            startValue: 0, // 从头开始。
            endValue: 5 // 展示到第几个。
        }
    ]
}
